#include <iostream>

using namespace std;

//求阶乘
int factorial(int x)
{
    int sum;

    if (x == 0)
        sum = 1;
    else
        sum = x * factorial(x-1);

    return sum;
}

int main()
{
    int x;

    cout << "the number is : ";
    cin >> x;
    cout << "the result is : " ;
    cout << factorial(x) << endl;
    return 0;
}


